package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class UniqueSpecification implements ColumnConstraint {

    private int beginIndex;
    private int endIndex;
    private boolean unique;
    private boolean primaryKey;

    public UniqueSpecification(int beginIndex,
                               int endIndex,
                               boolean unique,
                               boolean primaryKey) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.unique = unique;
        this.primaryKey = primaryKey;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public boolean isUnique() {
        return unique;
    }

    public boolean isPrimaryKey() {
        return primaryKey;
    }

}
